drop sequence group_seq;
create sequence group_seq;

drop table group_e;
create table group_e (
	group_name varchar2(50) primary key,
	group_leader varchar2(50) not null,
	group_content varchar2(50) not null,
	group_create_date date
)
drop table groupList_e;
create table groupList_e(
	group_no number primary key,
	group_name varchar2(50) not null,
	group_member varchar2(50) not null,
	group_join_date date,
	group_state varchar2(50) not null,
	constraint fk_group_gname foreign key(group_name) references group_e(group_name),
	constraint fk_grouplist_name foreign key(group_member) references member_e(id)
)

insert into group_e(group_name,group_leader,group_content,group_create_date)
	values(4,1,4,sysdate)

	insert into groupList_e(group_no,group_name,group_member,group_join_date,group_state)
	values(group_seq.nextval,'1','2',sysdate,'true')
	
	select e.group_name,e.group_leader,l.group_member
	FROM group_e e ,groupList_e l
	where e.group_name=l.group_name and l.group_name='1';

